<div ng-controller="FapiaoHistory as vm">
  <h1 class="page-title">历史发票<a class="btn pull-right" ng-href="/api/invoice/status/3/export">导出Excel</a></h1>

  <div class="well table-well">
    <div class="table-responsive">
      <table class="table table-striped table-bordered">
        <thead>
          <tr>
            <th>发票号</th>
            <th>承运人</th>
            <th>实际受票方</th>
            <th>收货方</th>
            <th>运费</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-repeat="fapiao in vm.fapiaos">
            <td><a ng-click="vm.viewDetail(fapiao.id)">{{fapiao.invoiceNumber}}</a></td>
            <td ng-show="{{fapiao.carrier}}">{{fapiao.carrier.contact.name}}({{fapiao.carrier.user.memberId}})</td>
              <td ng-show="{{fapiao.serviceShipper}}">{{fapiao.serviceShipper.enterpriseName}}({{fapiao.serviceShipper.taxerId}})</td>
            <td>{{fapiao.shipper.enterpriseName}}</td>
            <td>{{fapiao.receiver}}</td>
            <td>{{fapiao.price}}</td>
            <td> <a class="btn btn-primary btn-mini" ng-click="vm.viewDetail(fapiao.id)">查看</a></td>
          </tr>
          
          
        </tbody>
      </table>

    </div>
     <p ng-show="vm.noRecord">没有找到符合条件的数据！</p>
  </div>
      <div class="pagination pagination-centered" ng-show="!vm.noRecord">
        <ul>
         <li ng-class="vm.firstPage? 'disabled':''" ng-switch="vm.firstPage">
         <a ng-switch-when="false" ng-click="vm.loadPage(vm.currentPage-1)" >&laquo;</a>
         <a ng-switch-when="true" >&laquo;</a>
         </li>
          <li ng-repeat="me in vm.pages" ng-class="me==vm.currentPage? 'active':''" ng-switch="me==vm.currentPage">
            <a ng-switch-when="false" ng-click="vm.loadPage(me)" >{{me}}</a>
            <a ng-switch-when="true" >{{me}}</a>
            </li>
          <li ng-class="vm.lastPage? 'disabled':''" ng-switch on="vm.lastPage">
          <a ng-switch-when="false" ng-click="vm.loadPage(vm.currentPage+1)">&raquo;</a>
          <a ng-switch-when="true" >&raquo;</a>
          </li>
        </ul>
      </div>
</div>